import { downloadSheet } from "./download.js";
async function getVideosInfo(BVList, limits = 1, delay = 0, bookType = "xlsx") {
    // 这是同一类的api下的 URL 的构建

    let resArray = await spider.Ajax({
        urls: BVList.map((i) => "https://api.bilibili.com/x/web-interface/view?bvid=" + i),
        returnType: "json",
        type: "start",
        options: {
            cache: "force-cache",
        },
        limits,
        time: delay,
    });
    console.log(resArray);

    let afterParse = resArray.map((i) => i.data).flat();

    // 直接进行下载
    await downloadSheet(afterParse, "B站视频信息-" + new Date().getTime(), bookType);
}
export { getVideosInfo };
